package com.hnqcgczy.supplier.service;

import com.hnqcgczy.supplier.vo.Company;

import java.sql.SQLException;
import java.util.List;

public interface CompanyService {
    /**
     * 新增供应商-资质信息
     *
     * @param company
     * @return
     * @throws SQLException
     */
    boolean addCompany(Company company) throws SQLException;

    /**
     * 查询供应商资质信息
     *
     * @param company
     * @param pageNow  当前页
     * @param pageSize 每页显示多少条
     * @return
     * @throws SQLException
     */
    List<Company> queryByLike(Company company, int pageNow, int pageSize) throws SQLException;

    /**
     * 总记录数
     *
     * @param company
     * @return
     * @throws SQLException
     */
    int queryTotals(Company company) throws SQLException;

    /**
     * 查单个供应商信息
     *
     * @param companyId
     * @return
     * @throws SQLException
     */
    Company findOne(Integer companyId) throws SQLException;

    /**
     * 修改供应商信息
     *
     * @param company
     * @return
     * @throws SQLException
     */
    boolean update(Company company) throws SQLException;

    /**
     * 通过id删除资质信息
     *
     * @param companyId
     * @return
     * @throws SQLException
     */
    boolean delete(Integer companyId) throws SQLException;
}
